import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class FileDemo14 {
    public static void main(String[] args) throws IOException {
        try (OutputStream outputStream = new FileOutputStream("test.txt")){
            outputStream.write('h');
            outputStream.write('e');
            outputStream.write('l');
            outputStream.write('l');
            outputStream.write('o');
            outputStream.flush();
        }
    }
}
